﻿@model wh40klbWeb.Models.ArmyViewModel
@{
    ViewBag.Title = "Create";
}
<h2>
    Create</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>ArmyViewModel</legend>
        <div class="editor-label">
            Nom
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>
        <div class="editor-label">
            Description de l'armée
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>
        @if (Model.SquadTypesUsed != null)
        {
            <table>
                <thead>
                    <tr>
                        <th>
                            Nom
                        </th>
                        <th>
                            Quantitée maximum
                        </th>
                        <th>
                            Quantitée minimum
                        </th>
                    </tr>
                </thead>
                <tbody>
                    @Html.EditorFor(model => model.SquadTypesUsed)
                </tbody>
            </table>
        }
        @if (Model.SpecialRulesUsed != null)
        {
            <table>
                <thead>
                    <tr>
                        <th>
                            Nom
                        </th>
                        <th>
                            utilise
                        </th>
                    </tr>
                </thead>
                <tbody>
                    @Html.EditorFor(model => model.SpecialRulesUsed)
                </tbody>
            </table>
        }
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}
<div>
    @Html.ActionLink("Back to List", "Index")
</div>
